import logging
import yagmail
import yaml
def log_send():
    logging.basicConfig(filename='zxr.log',filemode='a+',format='%(filename)s--%(asctime)s--%(levelname)s--%(message)s',level=logging.DEBUG)

# def email(filename):
#     email=yagmail.SMTP(user='1441688225@qq.com',password='subvcobnwlujggee',host='smtp.qq.com')
#     email.send(to='1441688225@qq.com',subject='a3Mall业务',contents='a3mall搜索购买，加入购物车购买',attachments=filename)

def email(filename):
    email=yagmail.SMTP(user='1441688225@qq.com',password='subvcobnwlujggee',host='smtp.qq.com')
    email.send(to='1441688225@qq.com',subject='a3Mall业务',contents='a3mall搜索购买，加入购物车购买',attachments=filename)



def get_yaml():
    with open('D:\gaowupy\moli1\TestCast\data1.yaml','r',encoding='utf-8') as p:
        return yaml.safe_load(p)
print(get_yaml())